package com.zk.util;

import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;


public class WSUtil {

@SuppressWarnings("unused")
private static JaxWsProxyFactoryBean orgProxy;	//	机构信息推送服务客户端代理
	

/*	static{
		groupServiceUrl = getApplicationParam("groupServiceUrl");
		userServiceUrl = getApplicationParam("userServiceUrl");
		groupServiceUrlMut = getApplicationParam("groupServiceUrlMut");
		userServiceUrlMut = getApplicationParam("userServiceUrlMut");
	}*/
	
/*	private static Properties props;
	
	public static String getApplicationParam(String strParam) {
		//Properties props = null;
		if (props == null) {
			try {
				Resource resource = new ClassPathResource(
						"/web/conn.properties");
				props = PropertiesLoaderUtils.loadProperties(resource);

			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return props.getProperty(strParam);
	}*/

	

	
	
	/**
	 * 创建客户端服务代理
	 * @param proxy	WebService代理类
	 * @param serviceUrl	服务地址
	 * @param serviceClass	接口服务类
	 * @return	客户端服务代理
	 */
	@SuppressWarnings("unused")
	private static Object createClientProxy(JaxWsProxyFactoryBean proxy, String serviceUrl, Class<?> serviceClass) {
		if(proxy == null) {
			proxy = new JaxWsProxyFactoryBean();
			proxy.setAddress(serviceUrl);
			proxy.setServiceClass(serviceClass);
		}
	
		return proxy.create();
	}
}
